using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Analysis
{
    /// <summary>
    /// <para>Calculate Market Penetration</para>
    /// <para>Calculates the market penetration based on the number of customers within an area compared to a demographic variable such as total population.</para>
    /// <para>根据区域内的客户数量与人口统计变量（如总人口）的比较来计算市场渗透率。</para>
    /// </summary>    
    [DisplayName("Calculate Market Penetration")]
    public class CalculateMarketPenetration : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateMarketPenetration()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature class used for calculating market penetration.</para>
        /// <para>用于计算市场渗透率的输入要素类。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that contains the calculated market penetration features.</para>
        /// <para>包含计算出的市场渗透要素的输出要素类。</para>
        /// </param>
        /// <param name="_id_field">
        /// <para>ID Field</para>
        /// <para>A unique ID field in the market penetration layer.</para>
        /// <para>市场渗透层中的唯一 ID 字段。</para>
        /// </param>
        /// <param name="_market_penetration_base_field">
        /// <para>Market Penetration Base Field</para>
        /// <para>The field containing the values used to calculate market penetration. This field will be used as the denominator and represents your market—for example, Total Population or Total Households.</para>
        /// <para>包含用于计算市场渗透率的值的字段。此字段将用作分母并代表您的市场，例如，总人口或家庭总数。</para>
        /// </param>
        /// <param name="_in_customer_features">
        /// <para>Input Customer Features</para>
        /// <para>The input feature class containing the points for the customer layer.</para>
        /// <para>包含客户图层点的输入要素类。</para>
        /// </param>
        public CalculateMarketPenetration(object _in_features, object _out_feature_class, object _id_field, object _market_penetration_base_field, object _in_customer_features)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
            this._id_field = _id_field;
            this._market_penetration_base_field = _market_penetration_base_field;
            this._in_customer_features = _in_customer_features;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Calculate Market Penetration";

        public override string CallName => "ba.CalculateMarketPenetration";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _id_field, _market_penetration_base_field, _in_customer_features, _area_description_field, _weight_field, _create_report.GetGPValue(), _store_id, _link_field, _report_title, _report_folder, _report_format, _output_report];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature class used for calculating market penetration.</para>
        /// <para>用于计算市场渗透率的输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that contains the calculated market penetration features.</para>
        /// <para>包含计算出的市场渗透要素的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>ID Field</para>
        /// <para>A unique ID field in the market penetration layer.</para>
        /// <para>市场渗透层中的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _id_field { get; set; }


        /// <summary>
        /// <para>Market Penetration Base Field</para>
        /// <para>The field containing the values used to calculate market penetration. This field will be used as the denominator and represents your market—for example, Total Population or Total Households.</para>
        /// <para>包含用于计算市场渗透率的值的字段。此字段将用作分母并代表您的市场，例如，总人口或家庭总数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Market Penetration Base Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _market_penetration_base_field { get; set; }


        /// <summary>
        /// <para>Input Customer Features</para>
        /// <para>The input feature class containing the points for the customer layer.</para>
        /// <para>包含客户图层点的输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Customer Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_customer_features { get; set; }


        /// <summary>
        /// <para>Area Description Field</para>
        /// <para>The field used to describe each feature in the market penetration layer.</para>
        /// <para>用于描述市场渗透层中每个特征的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Description Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _area_description_field { get; set; } = null;


        /// <summary>
        /// <para>Customer Weight Field</para>
        /// <para>The field in the customer layer used as a weight to calculate market penetration rather than customer counts.</para>
        /// <para>客户层中的字段用作计算市场渗透率而不是客户计数的权重。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customer Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _weight_field { get; set; } = null;


        /// <summary>
        /// <para>Create Report</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a summary report will be created.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A summary report will be created.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A summary report will not be created. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否创建摘要报告。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将创建摘要报告。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会创建摘要报告。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Report")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_report_value _create_report { get; set; } = _create_report_value._false;

        public enum _create_report_value
        {
            /// <summary>
            /// <para>CREATE_REPORT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_REPORT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_CREATE_REPORT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_CREATE_REPORT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Input Feature Store ID Field</para>
        /// <para>A unique identifier associated with each store for each trade area.</para>
        /// <para>与每个贸易区域的每个商店关联的唯一标识符。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_id { get; set; } = null;


        /// <summary>
        /// <para>Customer Feature Store ID Field</para>
        /// <para>An ID that assigns a trade area to a customer.</para>
        /// <para>将贸易区分配给客户的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customer Feature Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _link_field { get; set; } = null;


        /// <summary>
        /// <para>Report Title</para>
        /// <para>The title of the report.</para>
        /// <para>报表的标题。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Title")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_title { get; set; } = null;


        /// <summary>
        /// <para>Output Report Folder</para>
        /// <para>The output directory that will contain the report.</para>
        /// <para>将包含报表的输出目录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_folder { get; set; } = null;


        /// <summary>
        /// <para>Report Format</para>
        /// <para>Specifies one or more output report formats. The default value is PDF. Additional available formats: XLSX, HTML, CSV, PAGX.</para>
        /// <para>指定一种或多种输出报告格式。默认值为 PDF。其他可用格式：XLSX、HTML、CSV、PAGX。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _report_format { get; set; } = null;


        /// <summary>
        /// <para>Output Report</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _output_report { get; set; }


        public CalculateMarketPenetration SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}